88. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2020-08-14 00:01:33 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

88.1 Files compared

#LocationFileLast Modified
12020-08-14 00:01:33 +0000
2Porto v3.2.4/Magento 2.x/Porto Theme/app/code/Mageplaza/LayeredNavigation/Plugin/PageCacheProcessRequest.php2020-06-26 11:11:14 +0000

88.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged00
Changed00
Inserted172
Removed00

88.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

88.4 Active regular expressions

No regular expressions were active.

88.5 Comparison detail

    1 <?php
    2 /**
    3  * Mageplaza
    4  *
    5  * NOTICE OF LICENSE
    6  *
    7  * This source file is subject to the Mageplaza.com license that is
    8  * available through the world-wide-web at this URL:
    9  * https://www.mageplaza.com/LICENSE.txt
    10  *
    11  * DISCLAIMER
    12  *
    13  * Do not edit or add to this file if you wish to upgrade this extension to newer
    14  * version in the future.
    15  *
    16  * @category    Mageplaza
    17  * @package     Mageplaza_LayeredNavigation
    18  * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
    19  * @license     https://www.mageplaza.com/LICENSE.txt
    20  */
    21 
    22 namespace Mageplaza\LayeredNavigation\Plugin\PageCache;
    23 
    24 use Magento\Framework\App\PageCache\Kernel;
    25 use Magento\Framework\App\Request\Http;
    26 use Mageplaza\LayeredNavigation\Helper\Data;
    27 
    28 /**
    29  * Class ProcessRequest
    30  * @package Mageplaza\LayeredNavigation\Plugin\PageCache
    31  */
    32 class ProcessRequest
    33 {
    34     /**
    35      * @var Http
    36      */
    37     protected $request;
    38 
    39     /**
    40      * @var Data
    41      */
    42     protected $helperData;
    43 
    44     /**
    45      * ProcessRequest constructor.
    46      *
    47      * @param Http $request
    48      * @param Data $helperData
    49      */
    50     public function __construct(
    51         Http $request,
    52         Data $helperData
    53     ) {
    54         $this->request    = $request;
    55         $this->helperData = $helperData;
    56     }
    57 
    58     /**
    59      * @param Kernel $subject
    60      */
    61     public function beforeLoad(Kernel $subject)
    62     {
    63         if ($this->helperData->isEnabled()) {
    64             $payload = Data::jsonDecode($this->request->getContent());
    65             $isLayer = isset($payload['mp_layer']) ? $payload['mp_layer'] : false;
    66 
    67             if ($isLayer) {
    68                 $this->request->setMethod('GET');
    69             }
    70         }
    71     }
    72 }